
// 在 1531 行增加
setTimeout(function () {
	var url = window.location.href.split("#")[1];
	if (url === '/admin/incident-templates') {
		console.log("ajax  ", url)
		jQuery.ajax({
			async: true,
			url: "/live/template/sync",
			type: 'PUT',
			success: function(response) {
				console.log("response ", response)
			}
		});
	}
}, 100 )

SELECT ad.approvalid as approvals_id, w.title as title, a3.statusname as status_name, a."name" as leval_name,ra.entityid as ticket,
	ad.approval_level_id AS levels, a.level as level_id,  a2.first_name as login_name, ad.sent_time as sent_time, ad.action_date as action_date
FROM request_approvallevel ra
	LEFT JOIN  approvaldetails ad ON ra.levelid = ad.approval_level_id
	LEFT JOIN approvallevel a ON a.id = ad.approval_level_id
	LEFT join approvalstatusdefinition a3 on a3.statusid = ad.statusid
	LEFT JOIN aaauser a2  ON a2.user_id = ad.approvedby  
	left join workorder w on w.workorderid = ra.id 
	LEFT JOIN aaalogin a4 on a4.user_id = ad.approvedby 
WHERE a4."name" = 'administrator' and ad.statusid in (2,3) order by ra.entityid desc